// packageK/invoice/list/list.js
const columns = [
  { title: "申请时间", key: "time", width: '250rpx' },
  { title: "发票总额", key: "amount", width: '150rpx' },
  { title: "发票状态", key: "status_name", type: "action", width: '150rpx' },
  { title: "操作", key: "controls", type: "action" }
]
const list = [
  { id: 1, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 2, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '审核通过', status: 1 },
  { id: 3, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '被驳回', status: 2 },
  { id: 4, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 5, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 6, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 7, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 8, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 9, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 10, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 11, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 12, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 13, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 14, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 15, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 16, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 17, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 18, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 19, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 },
  { id: 20, time: '2023-09-28 12:34:52', amount: '¥8000', status_name: '待审核', status: 0 }
]
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tableColumns: columns,
    dataList: list,
    tableHeight: '600rpx'
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    const { windowHeight } = wx.getSystemInfoSync()
    this.setData({ tableHeight: `${windowHeight * 2 - 40}rpx`})
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})